﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace com.IronOne.BoardAppWeb.Models.Service
{
    public class DownloadServiceModel
    {
        public List<SyncMeetingModel> LiveMeetingsData { get; set; }
        public List<SyncPaperModel> PapersData { get; set; }
        public List<SyncCommentModel> CommentsData { get; set; }
        public List<SyncMemberModel> MembersData { get; set; }
        public List<SyncHeadingModel> HeadingsData { get; set; }
        public List<SyncCatergoryModel> CatergoryData { get; set; }
        public SyncMemberModel userData { get; set; }
    }

    public class SyncMeetingModel
    {
        public int MeetingId { get; set; }
        public DateTime? Date { get; set; }
        public int CategoryId { get; set; }
        public string SubCategoryName { get; set; }
        public int? TimeStamp { get; set; }       
        public DateTime? LastUpdatedDateTime { get; set; }
        public string Description { get; set; }
        public string MemberAttendence { get; set; }
        public string MeetingOrganizer { get; set; }
        public byte Status { get; set; }        
        public string Info { get; set; }       
        public String AllowedActions { get; set; }
        public byte IsTentative { get; set; }
        public int MeetingType { get; set; }

        public override string ToString()
        {
            return " " + this.MeetingId + " " + this.Date + " " + this.SubCategoryName + " "
                + " " + this.MemberAttendence + " " + this.Status + " " + this.Info + " " + this.Description + "";
        }
    }

    public class SyncPaperModel
    {
        public int PaperId { get; set; }
        public int RefId { get; set; }
        public byte? RefType { get; set; }
        public string PaperRefNo { get; set; }
        public string DocName { get; set; }
        public byte DocType { get; set; }
        //public bool CircularApproval { get; set; }
        //public string FileURL { get; set; }
        public byte IsCarryFWDfromLastMeeting { get; set; }
        public string CarryFWDinfo { get; set; }
        public string MemberApprovalsString { get; set; }
        public byte UserApprovalStatus { get; set; }
        public int AgendaOrder { get; set; }
        //public int? AgendaItemId { get; set; }
        public byte PaperStatus { get; set; }
        public string StatusComment { get; set; }
        public byte NotificationStatus { get; set; }
        public string NotificationDescription { get; set; }
        public string Info { get; set; }
        public string Description { get; set; }
        public int? HeadingID { get; set; }
        public int? TimeStamp { get; set; }
        public String Actions { get; set; }
        public int VersionId { get; set; }
        public DateTime? DocCreatedDateTime { get; set; }

        public override string ToString()
        {
            return " " + this.PaperId + " " + this.RefId + " " + this.RefType + " "
                 + this.PaperRefNo + " " + this.DocName + " " + this.DocType + " "  
                 + this.IsCarryFWDfromLastMeeting + " " + this.CarryFWDinfo + " " + this.MemberApprovalsString + " " + this.UserApprovalStatus + " " + this.AgendaOrder + " "
                 + this.PaperStatus + this.StatusComment + " " + this.NotificationStatus + " " + this.NotificationDescription + this.Info + " "+TimeStamp + " ";
        }
    }

    public class SyncCommentModel
    {
        public int CommentId { get; set; }
        //public int RefId { get; set; }
        public int? PaperId { get; set; }
        public int? MeetingId { get; set; }
        public byte RefType { get; set; }
        public int MemberId { get; set; }
        public DateTime? LastUpdatedDateTime { get; set; } 
        public DateTime AddedDate { get; set; }
        public string Comment { get; set; }
        public string CommentedBy { get; set; } // Full name 

        public string Info { get; set; }
        public int? TimeStamp { get; set; }
        public byte Status { get; set; }

        public override string ToString()
        {
            return " " + this.CommentId + " " + this.PaperId + " " + this.MeetingId + " " + this.RefType + " "
                 + this.MemberId + " " + this.AddedDate + " " + this.Comment + " " + this.CommentedBy + " " + this.Info + " "
                 + this.TimeStamp + " ";
        }
    }

    public class SyncMemberModel
    {
        public int MemberId { get; set; }
        public string FullName { get; set; }
        public string CompanyName { get; set; }
        public string Address { get; set; }
        public string ContactNo { get; set; }
        public string EmailId { get; set; }
        public String UserName { get; set; }
        public string Info { get; set; }
        public int? TimeStamp { get; set; }
        public String Actions { get; set; }

        public override string ToString()
        {
            return " " + this.MemberId + " " + this.FullName + " " + this.CompanyName + " "
                 + this.Address + " " + this.ContactNo + " " + this.EmailId + " " + this.Info + " " + this.TimeStamp + " "
                 ;
        }
    }

    public class SyncHeadingModel
    {
        public int HeadingId { get; set; }
        public string Name {get; set;}
        public string Info { get; set; }
        public int MeetingId { get; set; }
        public int? PreviousHeadingId { get; set; }
        public int AgendaOrder { get; set; }

        public override string ToString()
        {
            return " " + this.HeadingId + " " + this.Name + " " + this.Info + " "
                 + this.MeetingId + " " + this.PreviousHeadingId + " " 
                 ;
        }
    }

    public class SyncCatergoryModel
    {
        public int CatergoryId { get; set; }
        public string Name { get; set; }
        public string Info { get; set; }
        public String Actions { get; set; }

        public override string ToString()
        {
            return " " + this.CatergoryId + " " + this.Name + " " + this.Info + " "
                 + this.Actions + " " 
                 ;
        }
    }

   

    public class InputDownloadServiceModel
    {
        public int CustomUserId { get; set; }
        public int MeetingLastId { get; set; }
        public int PaperLastId { get; set; }
        public int CommentLastId { get; set; }
        public int MemberLastId { get; set; }
        public int MeetingTimeStamp { get; set; }
        public int PaperTimeStamp { get; set; }
        public int CommentTimeStamp { get; set; }
        public int MemberTimeStamp { get; set; }
        public int HeadingLastId { get; set; }
        public int CatergoryLastId { get; set; }
        public bool IsFirstTime { get; set; }

        public override string ToString()
        {
            return " " + this.CustomUserId + " " + this.MeetingLastId + " " + this.PaperLastId + " "
                 + this.CommentLastId + " " + this.MemberLastId + " " + this.MeetingTimeStamp + " " + this.PaperTimeStamp +" "
                 + " " + this.CommentTimeStamp + " " + this.MemberTimeStamp + " " + this.HeadingLastId + " " + this.CatergoryLastId+" "+this.IsFirstTime;
        }

    }
}